<?php
// +----------------------------------------------------------------------
// | Siteplus [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017 http://www.brsttech.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Pillar <service@brsttech.com>
// +----------------------------------------------------------------------
namespace app\admin\validate;
use think\Validate;

class Auth extends Validate{

    protected $rule = [
        'parent_id' =>  'require|number',
        'title'     =>  'require',
        'auth_code' =>  'require',
        'id'        =>  'require|number'
    ];

    protected $message = [
        'parent_id' =>  '{%lang_auth_parent_id}',
        'title'     =>  '{%lang_auth_title}',
        'auth_code' =>  '{%lang_auth_auth_code}',
        'id'        =>  '{%lang_auth_id}',
    ];

    protected $scene = [
        'add'   =>  ['parent_id','title','auth_code'],
        'edit'  =>  ['id','parent_id','title','auth_code'],
    ];

}